<template>
  <div @touchmove.prevent>
    <router-view />
    <van-tabbar v-model="active" active-color="#24A19D" v-if="$route.meta.Tabbar">
      <van-tabbar-item name="home" icon="friends" to="/">首页</van-tabbar-item>
      <van-tabbar-item name="order" icon="cart" to="/order">订单</van-tabbar-item>
      <van-tabbar-item name="my" icon="location" to="/my">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<style lang="less">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.custom-nav-bar {
  --van-nav-bar-text-color: #3EB8BC;
  --van-nav-bar-icon-color: #3EB8BC;
  --van-sidebar-selected-border-color: #3EB8BC;
}

</style>
<script lang="ts" setup>
import { ref } from 'vue'
import { useStore } from 'vuex';
const store = useStore()
const active = ref('home')

store.commit('setActive',active.value)

</script>
